﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>修改基本资料 - {site.Name}</title>
<script type="text/javascript" src="{site.Dir}_data/SysConfig.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery-min.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery.form.js"></script>
<script type="text/javascript" src="{site.Dir}scripts/jumbotcms.js?v4"></script>
<link type="text/css" rel="stylesheet" href="{site.Dir}style/global.css" />
<link type="text/css" rel="stylesheet" href="{site.Dir}_libs/jquery.formvalidator/style.css" />
<script src="{site.Dir}_libs/jquery.formvalidator.js" type="text/javascript"></script>

<script type="text/javascript" src="{site.Dir}webui/my97datepicker4.6/WdatePicker.js"></script>
<script type="text/javascript">
(function(){
	$(document).ready(function(){
		$.ajax({
			type:		"get",
			dataType:	"json",
			data:		"time="+(new Date().getTime()),
			url:		site.Dir + "ajax/user.aspx?oper=ajaxUserInfo",
			success:	function(data){
				//数据绑定
				if(data.idcard =="")
					$(".iddisplay").show();
				$("input[@name=rblSex][@value="+data.sex+"]").attr("checked",true);
				$("#txtBirthday").val(data.birthday);
				$("#ddlIDType").attr("value",data.idtype);
				$("#txtIDCard").val(data.idcard);
				$("#txtComeFrom").val(data.comefrom);
				$("#txtWorkUnit").val(data.workunit);
				$("#txtAddress").val(data.address);
				$("#txtZipCode").val(data.zipcode);
				$("#txtMobileTel").val(data.mobiletel);
				$("#txtTelephone").val(data.telephone);
				$("#txtQQ").val(data.qq);
				$("#txtMSN").val(data.msn);
				$("#txtHomePage").val(data.homepage);
			}
		});
		$('#changeprofileForm').ajaxForm({
			beforeSubmit: JumbotCms.AjaxFormSubmit,
			success :function(data){
				JumbotCms.Eval(data);
			}
		}); 
		$.formValidator.initConfig({onError:function(msg){}});
		$("#txtComeFrom")
			.formValidator({empty:true,tipid:"tipComeFrom",onshow:"",onfocus:"比如：北京、上海",oncorrect:""})
			.InputValidator({min:1,onerror: "必填项!"});
		$("#txtIDCard")
			.formValidator({empty:true,tipid:"tipIDCard",onshow:"认真填写，填完不可修改",onfocus:"认真填写，填完不可修改",oncorrect:""})
			.RegexValidator({regexp:"^([0-9a-zA-Z]{6,30})$",onerror:"6-30位数字,部分含有字母"});
		$("#txtWorkUnit")
			.formValidator({empty:true,tipid:"tipWorkUnit",onshow:"",onfocus:"比如：远洋科技",oncorrect:""})
			.InputValidator({min:1,onerror: "必填项!"});
		$("#txtAddress")
			.formValidator({empty:true,tipid:"tipAddress",onshow:"",onfocus:"比如：北京市某某区某某路",oncorrect:""})
			.InputValidator({min:1,onerror: "必填项!"});
		$("#txtZipCode").formValidator({empty:true,tipid:"tipZipCode",onshow:"",onfocus:"",oncorrect:""}).InputValidator({min:6,max:6,onerror:"邮政编码为6位,请确认"}).RegexValidator({regexp:"zipcode",datatype:"enum",onerror:"格式不正确"});
		$("#txtMobileTel").formValidator({empty:true,tipid:"tipMobileTel",onshow:"",onfocus:"要填必须填正确",oncorrect:""}).InputValidator({min:11,max:11,onerror:"必须是11位的,请确认"}).RegexValidator({regexp:"mobile",datatype:"enum",onerror:"手机是13和15开头的11位数字"});
		$("#txtTelephone").formValidator({empty:true,tipid:"tipTelephone",onshow:"",onfocus:"要填必须填正确",oncorrect:"",onempty:"真的不想留电话了吗？"}).RegexValidator({regexp:"^[[0-9]{3}-|\[0-9]{4}-]?([0-9]{8}|[0-9]{7})?$",onerror:"格式例如：010-88666688"});
		$("#txtQQ").formValidator({empty:true,tipid:"tipQQ",onshow:"",onfocus:"请输入你的QQ号,可以为空",oncorrect:"",onempty:"你真的不想留QQ吗？"}).InputValidator({min:5,max:14,onerror:"位数不正确,请确认"}).RegexValidator({regexp:"qq",datatype:"enum",onerror:"格式不正确"});
		$("#txtMSN").formValidator({empty:true,tipid:"tipMSN",onshow:"",onfocus:"请输入你的MSN帐号,可以为空",oncorrect:"",onempty:"你真的不想留MSN吗？"}).RegexValidator({regexp:"email",datatype:"enum",onerror:"格式不正确"});
	});
	//Form验证
	JumbotCms.AjaxFormSubmit=function(item){
		try{
			if(jQuery.formValidator.PageIsValid('1'))
			{
				JumbotCms.Loading.show("正在处理，请稍等...");
				return true;
			}else{
				return false;
			}
		}catch(e){
			return false;
		}
	};
})();
</script>
<script type="text/javascript" src="{site.Dir}user/otherfiles/scripts/ajax.js"></script>
</head>
<body>
<style>
@import url({site.Dir}user/otherfiles/css/writer_back.v2.css);
#ucmenu{width:600px;}
</style>
<iframe frameborder="0" scrolling="no" src="{site.Dir}user/index/index.aspx?do=header" width="100%" height="76" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="ifheader"></iframe>
<!--顶部结束,中框架开始-->
<div id="user_content">
	<!--menu-->
	<div class="user_menu">
		<iframe frameborder="0" scrolling="no" src="{site.Dir}user/index/index.aspx?do=left" width="176" height="700" name="iFrame1"  marginwidth="0" marginheight="0" hspace="0" vspace="0" id="ifleft"></iframe>
	</div>
	<script type="text/javascript">
function reinitIframe(str){
	var iframe = document.getElementById(str);
	try{
		var bHeight = iframe.contentWindow.document.body.scrollHeight;
		var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bHeight, dHeight);
		iframe.height =  height;
	}catch (ex){}
}
window.setInterval("reinitIframe('ifleft')", 200);
</script>
	<!--右侧功能细分区-->
	<div id="function_box">
		<div class="nav_two">
			<ul>
				<li><a href="{site.Dir}user/changepass/index.aspx">密码设置</a></li>
				<li class="currently"><a href="{site.Dir}user/changeprofile/index.aspx">基本资料</a></li>
				<li><a href="{site.Dir}user/changeavatar/index.aspx">形象设计</a></li>
				<li><a href="{site.Dir}user/changeexpertise/index.aspx?mod=writer">个人专长</a></li>
				<li><a href="{site.Dir}user/changegathering/index.aspx?mod=writer">收款信息</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<div>
			<form id="changeprofileForm" name="form1" method="post" action="?act=save">
				<table style="width:100%;" border="0" cellspacing="4" cellpadding="4" id="studio">
					<tr>
						<td height="30" align="right">性别：</td>
						<td><input type="radio" name="rblSex" value="1">
							男&nbsp;
							<input type="radio" name="rblSex" value="2">
							女&nbsp;
							<input type="radio" name="rblSex" value="0" checked>
							保密</td>
						<td></td>
					</tr>
					<tr>
						<td height="30" align="right">出生日期：</td>
						<td><input name="txtBirthday" type="text" style="width:90px;" value="1980-01-01" maxlength="20" id="txtBirthday" class="Wdate input" onFocus="WdatePicker({isShowClear:false,readOnly:true,skin:'blue'})" readonly="readonly" /></td>
						<td></td>
					</tr>
					<tr class="iddisplay" style="display:none">
						<td height="30" align="right">证件类型：</td>
						<td><select name="ddlIDType" id="ddlIDType">
								<option value="1" selected="selected">身份证</option>
								<option value="2">军官证</option>
								<option value="3">学生证</option>
								<option value="4">其他证件</option>
							</select></td>
						<td></td>
					</tr>
					<tr class="iddisplay" style="display:none">
						<td height="30" align="right">证件号码：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtIDCard" id="txtIDCard" /></td>
						<td><div class="ValidatorTip" id="tipIDCard" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">所在地区：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtComeFrom" id="txtComeFrom" /></td>
						<td><div class="ValidatorTip" id="tipComeFrom" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">工作单位：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtWorkUnit" id="txtWorkUnit" /></td>
						<td><div class="ValidatorTip" id="tipWorkUnit" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">联系地址：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtAddress" id="txtAddress" /></td>
						<td><div class="ValidatorTip" id="tipAddress" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">邮政编码：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtZipCode" id="txtZipCode" /></td>
						<td><div class="ValidatorTip" id="tipZipCode" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">手机号码：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtMobileTel" id="txtMobileTel" /></td>
						<td><div class="ValidatorTip" id="tipMobileTel" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">联系电话：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtTelephone" id="txtTelephone" /></td>
						<td><div class="ValidatorTip" id="tipTelephone" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">QQ：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtQQ" id="txtQQ" /></td>
						<td><div class="ValidatorTip" id="tipQQ" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">MSN：</td>
						<td><input type="text" class="inputss" style="width:180px;" name="txtMSN" id="txtMSN" /></td>
						<td><div class="ValidatorTip" id="tipMSN" style="width:200px"></div></td>
					</tr>
					<tr>
						<td height="30" align="right">个人网站：</td>
						<td colspan="2"><input type="text" class="inputss" style="width:200px;" name="txtHomepage" maxlength="100" id="txtHomePage" /></td>
					</tr>
					<tr>
						<td colspan="3" align="center" valign="bottom"><input type="submit" id="btnSave" value="确定修改" class="button" />
							<a href="{site.Dir}user/index/index.aspx">取消</a></td>
					</tr>
				</table>
			</form>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</div>
<iframe frameborder="0" scrolling="no" src="{site.Dir}user/index/index.aspx?do=footer" width="100%" height="50" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="iffooter"></iframe>
</body>
</html>
